<div class="pageContent">
    <div class="pageFormContent" layoutH="56">
        <div class="panel">
            <h1>订单信息</h1>
            <div>
                <div class="unit">
                    <label>
                        订单号
                    </label>
                    <span class="unit_span">{$datainfo.code}</span>
                </div>
                <div class="unit">
                    <label>
                        下单会员
                    </label>
                    <span class="unit_span">{$datainfo.member.username}</span>
                </div>
                <div class="unit">
                    <label>
                        下单时间
                    </label>
                    <span class="unit_span">{$datainfo['happen']|date='Y-m-d H:i:s',###}</span>
                </div>
                <div class="unit">
                    <label>
                        订单状态
                    </label>
                    <span class="unit_span">{$sets['order_progress'][$datainfo['progress']]}</span>
                </div>
                <switch name="datainfo.progress">
                    <case value="1">
                        <!-- **********************未付款**********************  -->
                        <div class="unit">
                            <label>
                                付款方式
                            </label>
                            <select name="pay_type" id="pay_type_{$datainfo[$mpk]}">
                                <volist name="sets.pay_type" id="svo">
                                    <option value="{$key}"
                                        <eq name='datainfo.pay_type' value='$key'>
                                            selected="selected"
                                        </eq>>{$svo}
                                    </option>
                                </volist>
                            </select>
                            <a class="tbutton" onclick="orderform_changePay_type('{$datainfo[$mpk]}','pay_type_{$datainfo[$mpk]}')" href='#nogo'><span>修改</span></a>
                            <a class="tbutton" onclick="orderform_payed('{$datainfo[$mpk]}')" href='#nogo'><span>确认买家成功付款</span></a>
                        </div>
                        <div class="unit">
                            <label>
                                &nbsp;
                            </label>
                            <a href="{:U('turnoff')}" target="ajaxTodo" title="确定要关闭此交易吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">关闭交易</a>
                        </div>
                    </case>
                    <case value="2">
                        <!-- **********************已付款********************** -->
                        <div class="unit">
                            <label>
                                付款时间
                            </label>
                            <span class="unit_span">{$datainfo['pay_time']|date='Y-m-d H:i:s',###}</span>
                        </div>
                        <div class="unit">
                            <label>
                                <volist name="sets.pay_type" id="svo">
                                    <eq name='datainfo.pay_type' value='$key'>
                                        {$svo}
                                    </eq>
                                </volist>
                            </label>
                            <a href="{:U('cancel')}" target="ajaxTodo" title="确定要退款吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">退款</a>
                        </div>
                        <div class="unit">
                            <label>
                                快递方式
                            </label>
                            <select name="express_type" id="express_type_{$datainfo[$mpk]}">
                                <volist name="sets.express_type" id="svo">
                                    <option value="{$key}"
                                        <eq name='datainfo.express_type' value='$key'>
                                            selected="selected"
                                        </eq>>{$svo}
                                    </option>
                                </volist>
                            </select>
                            <input class="textInput" name="express_code" id="express_code_{$datainfo[$mpk]}"/><a class="tbutton" onclick="orderform_express('{$datainfo[$mpk]}','express_type_{$datainfo[$mpk]}','express_code_{$datainfo[$mpk]}')" href='#nogo'><span>发货</span></a>
                        </div>
                    </case>
                    <case value="3">
                        <!-- **********************已发货********************** -->
                        <div class="unit">
                            <label>
                                付款时间
                            </label>
                            <span class="unit_span">
                                <volist name="sets.pay_type" id="svo">
                                    <eq name='datainfo.pay_type' value='$key'>
                                        [{$svo}]
                                    </eq>
                                </volist>
                                {$datainfo['pay_time']|date='Y-m-d H:i:s',###}
                            </span>
                        </div>
                        <div class="unit">
                            <label>
                                快递运单号
                            </label>
                            <span class="unit_span">
                                <volist name="sets.express_type" id="svo">
                                    <eq name='datainfo.express_type' value='$key'>
                                        [{$svo}]
                                    </eq>
                                </volist>
                                {$datainfo.express_code}
                            </span>
                        </div>
                        <div class="unit">
                            <label>
                                发货时间
                            </label>
                            <span class="unit_span">{$datainfo['delivery_time']|date='Y-m-d H:i:s',###}</span>
                        </div>
                        <div class="unit">
                        <label>
                            &nbsp;
                        </label>
                        <a href="{:U('cancel')}" target="ajaxTodo" title="确定要退款吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">退款</a>
                        <a href="{:U('complete')}" target="ajaxTodo" title="确定交易成功吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">交易成功</a>
                        </p>
                    </case>
                    <case value="4">
                    <!-- **********************成功交易********************** -->
                    <div class="unit">
                        <label>
                            付款时间
                        </label>
                        <span class="unit_span">
                            <volist name="sets.pay_type" id="svo">
                                <eq name='datainfo.pay_type' value='$key'>
                                    [{$svo}]
                                </eq>
                            </volist>
                            {$datainfo['pay_time']|date='Y-m-d H:i:s',###}
                        </span>
                    </div>
                    <div class="unit">
                        <label>
                            快递运单号
                        </label>
                        <span class="unit_span">
                            <volist name="sets.express_type" id="svo">
                                <eq name='datainfo.express_type' value='$key'>
                                    [{$svo}]
                                </eq>
                            </volist>
                            {$datainfo.express_code}
                        </span>
                    </div>
                    <div class="unit">
                        <label>
                            发货时间
                        </label>
                        <span class="unit_span">{$datainfo['delivery_time']|date='Y-m-d H:i:s',###}</span>
                    </div>
                    <div class="unit">
                    <label>
                        订单完成时间
                    </label>
                    <span class="unit_span">{$datainfo['complete_time']|date='Y-m-d H:i:s',###}</span>
                    </p>
                </case>
                <case value="5">
                    <!-- **********************已关闭交易********************** -->
                    <div class="unit">
                        <label>
                            关闭时间
                        </label>
                        <span class="unit_span">{$datainfo['turnoff_time']|date='Y-m-d H:i:s',###}</span>
                    </div>
                </case>
                <case value="6">
                    <!-- **********************退款中********************** -->
                    <div class="unit">
                        <label>
                            付款时间
                        </label>
                        <span class="unit_span">
                            <volist name="sets.pay_type" id="svo">
                                <eq name='datainfo.pay_type' value='$key'>
                                    [{$svo}]
                                </eq>
                            </volist>
                            {$datainfo['pay_time']|date='Y-m-d H:i:s',###}
                        </span>
                    </div>
                    <div class="unit">
                        <label>
                            快递运单号
                        </label>
                        <span class="unit_span">
                            <volist name="sets.express_type" id="svo">
                                <eq name='datainfo.express_type' value='$key'>
                                    [{$svo}]
                                </eq>
                            </volist>
                            {$datainfo.express_code}
                        </span>
                    </div>
                    <div class="unit">
                        <label>
                            发货时间
                        </label>
                        <span class="unit_span">{$datainfo['delivery_time']|date='Y-m-d H:i:s',###}</span>
                    </div>
                    <div class="unit">
                        <label>
                            &nbsp;
                        </label>
                        <a href="{:U('cancel')}" target="ajaxTodo" title="确定要退款吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">退款</a>
                        <a href="{:U('complete')}" target="ajaxTodo" title="确定交易成功吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">交易成功</a>
                    </div>
                    <div class="unit">
                        <label>
                            退款时间
                        </label>
                        <span class="unit_span">{$datainfo['cancel_time']|date='Y-m-d H:i:s',###}</span>
                    </div>
                    <div class="unit">
                        <label>
                            &nbsp;
                        </label>
                        <a href="{:U('turnoff')}" target="ajaxTodo" title="确定要关闭此交易吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">关闭交易</a>
                        <a href="{:U('complete')}" target="ajaxTodo" title="确定交易成功吗?" data="{$mpk}={$datainfo[$mpk]}&navTabId=index{$Think.MODULE_NAME}" class="tbutton">交易成功</a>
                    </div>
                </case>
                <default/>
                </switch>
            </div>
        </div>
        <div class="divider">
        </div>
        <div class="panel">
            <h1>商品信息</h1>
            <div>
                <table class="list" width="98%">
                    <thead>
                        <tr>
                            <th style="text-align:center;">
                                商品名称
                            </th>
                            <th style="text-align:center;">
                                价格
                            </th>
                            <th style="text-align:center;">
                                数量
                            </th>
                            <th style="text-align:center;">
                                商品编号
                            </th>
                            <th style="text-align:center;">
                                积分优惠
                            </th>
                            <th style="text-align:center;">
                                总金额(元)
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <volist name="datainfo.good" id="vo">
                            <tr class="ordergood">
                                <td width="250px">
                                    <span class="ordergood_thumb"><a href="__ROOT__/good-{$vo['good_id']}.html" target="_blank" rel="editGood">{$vo['thumb']|advstr='80px','80px',$srcpre}</a></span>
                                    <span class="ordergood_name">{$vo.name}
                                        <br/>
                                        {$vo['good_attr']}
                                    </span>
                                </td>
                                <td>
                                    {$vo.good_price}
                                </td>
                                <td>
                                    {$vo.good_num}
                                </td>
                                <td>
                                    {$vo.tcode}
                                </td>
                                <td>
                                    {$vo.discount}
                                </td>
                                <td>
                                    {$vo.total_fee}
                                </td>
                            </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="divider">
        </div>
        <div class="panel">
            <h1>订单备注</h1>
            <div>
                <div class="detailbox">
                    <empty name="datainfo.detail">
                        无备注
                    </empty>{$datainfo.detail}
                </div>
            </div>
        </div>
        <div class="divider">
        </div>
        <style>
            .uinfo p label {
                text-align: right;
            }
        </style>
        <div class="panel">
            <h1>收货人信息</h1>
            <div class="uinfo">
                <div class="unit">
                    <label>
                        收货人姓名:
                    </label>
                    <span class="unit_span">{$datainfo.consignee}</span>
                </div>
                <div class="unit">
                    <label>
                        收货人是谁:
                    </label>
                    <span class="unit_span">
                        <eq name="datainfo.is_self" value="1">
                            本人<else/>他人
                        </eq>
                    </span>
                </div>
                <div class="unit">
                    <label>
                        收货人地址: 
                    </label>
                    <span class="unit_span">{$datainfo.addr}&nbsp;{$datainfo.consignee_addr}</span>
                </div>
                <neq name="datainfo.is_self" value="1">
                <div class="unit">
                    <label>
                        下单人姓名:
                    </label>
                    <span class="unit_span">{$datainfo.self_name}</span>
                </div>
                <else/>
            </div>
            <div class="unit">
            </neq>
            <div class="unit">
                <label>
                    收货人手机:
                </label>
                <span class="unit_span">{$datainfo.consignee_phone}</span>
            </div>
            <neq name="datainfo.is_self" value="1">
                <div class="unit">
                    <label>
                        下单人手机: 
                    </label>
                    <span class="unit_span">{$datainfo.self_phone}</span>
                </div>
                <else/>
                <div class="unit">
                    &nbsp;
                </div>
            </neq>
            <div class="unit">
                <label>
                    收货人电话:
                </label>
                <span class="unit_span">{$datainfo.consignee_tel}</span>
            </div>
            <div class="unit">
                &nbsp;
            </div>
            <div class="unit">
                <label>
                    收货人邮编:
                </label>
                <span class="unit_span">{$datainfo.zipcode}</span>
            </div>
        </div>
    </div>
    <div class="divider">
    </div>
    <div class="panel">
        <h1>管理员备注</h1>
        <div>
            <form method="post" action="{:U('Orderform/addnote')}" class="pageForm required-validate" onsubmit="return validateCallback(this,doAjaxDone);">
                <textarea rows="3" cols="80" class="required" name="note">
                </textarea>
                <input type="hidden" name="orderform_id" value="{$datainfo.orderform_id}">
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            保存
                        </button>
                    </div>
                </div>
            </form>
            <table class="list" width="98%">
                <thead>
                    <tr>
                        <th width="160px">
                            时间
                        </th>
                        <th>
                            备注
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="datainfo.note" id="vo">
                        <tr>
                            <td>
                                {$vo.created|date='Y-m-d H:i:s',###}
                            </td>
                            <td>
                                {$vo.note}
                            </td>
                            <td>
                                <a href="{:U('Orderform/delnote')}" target="ajaxTodo" title="确定要删除吗?" data="id={$vo['id']}&orderform_id={$datainfo.orderform_id}" class="tbutton">删除</a>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
        </div>
    </div>
    <div class="divider">
    </div>
</div>
<div class="formBar">
    <ul>
        <li>
            <div class="button">
                <div class="buttonContent">
                    <button type="button" class="close">
                        关闭
                    </button>
                </div>
            </div>
        </li>
    </ul>
</div>
